<?php
//scope=snsapi_base 实例
$appid='wxd6671ed64906b4b4';
$redirect_uri = urlencode ( 'http://www.goodshare.com.cn/wap/wxauth2.php' );
$url ="https://open.weixin.qq.com/connect/oauth2/authorize?appid=$appid&redirect_uri=$redirect_uri&response_type=code&scope=snsapi_userinfo&state=1#wechat_redirect";
header("Location:".$url);
?>
